<template>
  <!-- <div id="app"> -->
  <div class="main-warp">
    <van-row>
      <van-col
        span="3"
        v-for="(item, index) in buttonText"
        :key="index"
        style="margin-top: 20px"
      >
        <van-button @click="jumpNewPages(item)" type="primary">
          {{ item.name }}
        </van-button>
      </van-col>
    </van-row>
  </div>

  <router-view></router-view>
  <!-- </div> -->
</template>
<script setup lang="ts">
import { assetsText } from "./common/assetsConst";
import { useRouter } from "vue-router";
import { ref } from "vue";
const router = useRouter();
console.log("dddddddd", import.meta.env);
type btnType = {
  name: string;
  path: string;
  param: string;
};

const buttonText = ref<btnType[]>(assetsText());

const jumpNewPages = (params: btnType):void => {
  router.push({ path: params.path });
};
</script>
<style>
.main-warp {
  margin-bottom: 30px;
}
</style>
